<template>
    <div v-if="members && members.length > 0">
        {{title ? title + ': ' : ''}}
        <span v-for="(item, index) in members" :key="index">{{index && '、' || ''}}
            <a-popover :title="item.title">
                <template slot="content">
                    <p>姓名: {{item.name}}</p>
                    <p>工号: {{item.number}}</p>
                    <p>手机: {{item.phone}}</p>
                </template>
                {{item.name}}
            </a-popover>
        </span>
    </div>
</template>

<script>
    export default {
        name: "UserCard",
        props: {
            title: {
                type: String,
                default: () => null
            },
            members: {
                type: Array,
                default: () => null
            }
        }
    }
</script>
